package ird.demo.service.impl;

import java.util.List;

import ird.demo.domain.TranGrp;
import ird.demo.domain.Transaction;
import ird.demo.repository.TranGrpRepository;
import ird.demo.service.TranGrpService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

@Service
public class TranGrpServiceImpl implements TranGrpService{
	@Autowired
	private TranGrpRepository tranGrpRepository;
	
	public List<TranGrp> findAllTranGrp(){
		return tranGrpRepository.findAllTranGrp();
	}
	
	public Page<TranGrp> findPageTranGrp(PageRequest request){
		return tranGrpRepository.findAll(request);
	}
	
	public TranGrp findTranGrpById(String id){
		return tranGrpRepository.findOne(id);
	}
	
	public void delTranGrp(String id){
		tranGrpRepository.delete(id);
	}
}
